function [ new_v ] = jacobi(v, f, current)
%JACOBI Summary of this function goes here
%   Detailed explanation goes here

global omega;
global A;
global D;
global iD;
global C;

assert(size(A{current},1) == size(A{current},2));
assert(size(A{current},1) == length(f));
assert(size(A{current},1) == length(v));
assert(size(A{current},1) == size(C{current},1));
assert(size(A{current},2) == size(C{current},2));
assert(size(A{current},1) == size(D{current},1));
assert(size(A{current},2) == size(D{current},2));

new_v = (1 - omega) * v + omega * iD{current} * (f - C{current}*v);

assert(size(A{current},1) == length(new_v));

end
